add method to 'scale' SVGs by modifying display size and viewbox#68
add method to 'scale' SVGs by modifying display size and viewbox#68
Conversation
|
@jensens thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment: To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
|
@jenkins-plone-org please run jobs |
davisagli
left a comment
There was a problem hiding this comment.
Maybe a stupid question (because I should read more about SVG): is it possible to handle this using width/height and the object-fit CSS property on the img tag that references the SVG file, instead of modifying the contents of the SVG?
|
You can. But it is a workaround only IMO. It would need changes in many places and is orthogonal to our current image handling. We have the infrastructure to modify images, so we can "scale" and "crop" SVGs properly. Also we could then embed those instead of loading them by image tag. |
c6e0f40 to
443fac8
Compare
|
@jenkins-plone-org please run jobs |
695a8f7 to
ac11536
Compare
|
@jenkins-plone-org please run jobs |
Needs to be merged before plone/plone.namedfile#133